package com.veer.shop.param;

import java.util.Map;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.veer.shop.config.Constants;
import com.veer.shop.utils.DateTimeUtil;

/**
 * 标签列表请求参数 实体类
 * 
 * @author WangBin
 * 2020年9月25日-下午2:07:33
 */
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class TagParam {
	
	private String tag_name;
	private String created_at;
	private String is_actived;
	private int page_no = 1;
	private int page_size = Constants.DEFAULT_PAGE_SIZE;
	private String begin_at = "";
	private String end_at = "";
	public String getTagName() {
		return tag_name;
	}
	public void setTagName(String tag_name) {
		this.tag_name = tag_name;
	}
	public String getCreatedAt() {
		return created_at;
	}
	public void setCreatedAt(String created_at) {
		
		// 这里需要预处理时间区间
		Map<String, String> createdAtRange = DateTimeUtil.parseCreatedAtRange(created_at);
		this.begin_at = createdAtRange.get("begin_at");
		this.end_at = createdAtRange.get("end_at");
		this.created_at = created_at;
	}
	public String getIsActived() {
		return is_actived;
	}
	public void setIsActived(String is_actived) {
		this.is_actived = is_actived;
	}
	public int getPageNo() {
		return page_no;
	}
	public void setPageNo(int page_no) {
		this.page_no = page_no;
	}
	public int getPageSize() {
		return page_size;
	}
	public void setPageSize(int page_size) {
		this.page_size = page_size;
	}
	public String getBeginAt() {
		return begin_at;
	}
	public String getEndAt() {
		return end_at;
	}
}
